FUNCTION calc_survey_observations
  {
	int i,j,k,ii;
	//qs: 1= cpue; 2: reclas; 3: pelaces; 4: mph
	q=mfexp(log_q);
	//pred_cpue
	s_pred_cpue=q(1)*vulnbiom;

	//Reclas survey and pelaces
	for(i=1;i<=nmo;i++)
	{
		s_pred_Brec(i)=0;
		s_pred_Bpel(i)=0;
		for(j=1;j<=nco;j++)
		{
			s_pred_Brec(i)+=q(2)*sel_reclas(i,j)*s_weico(i,j)*N(i,j);
			s_pred_Bpel(i)+=q(3)*sel_pelaces(i,j)*s_weico(i,j)*N(i,j);
		}
    	}
	 //DEPM ssb
	 s_pred_SSB=q(4)*sbiom;

	 //prepare to compute survey at length
	for(i=1;i<=nmo;i++)
	{
		itmp=0;
		for(j=1;j<=nco;j++)
		{
			if(ones(i,j)>0)
			{
				itmp=itmp+1;
				s_pred_p_reclasage(i,itmp)=sel_reclas(i,j)*N(i,j);
				s_pred_p_pelaceage(i,itmp)=sel_pelaces(i,j)*N(i,j); //
			}
		}
				s_pred_p_reclasage(i)= s_pred_p_reclasage(i)/(sum(s_pred_p_reclasage(i))+1e-10);
				s_pred_p_pelaceage(i)= s_pred_p_pelaceage(i)/(sum(s_pred_p_pelaceage(i))+1e-10);
	}

	 //length comp surveys 2 and 3
	 for (i=1;i<=nyr;i++)
	 {
		for(j=1;j<=12;j++)
		{
				itmp=mes(j,i);
				s_pred_p_reclaslen(itmp)=s_pred_p_reclasage(itmp)*s_Agesize(j);
				s_pred_p_pelacelen(itmp)= s_pred_p_pelaceage(itmp)*s_Agesize(j);
		}
	}

	if(verbose)cout<<"**** Ok after calc_survey_observations ****"<<endl;

  }
